// miniprogram/pages/report/ExpensesReport.js
var app = getApp(); 
Page({

  /**
   * 页面的初始数据
   */
  data: {
    date: '2020-06-01',
    remark:true,
    disble:false,
    items: [],
    Temp: true
  },
  bindDateChange: function (e) {
    this.setData({
      date: e.detail.value
    })
  },
  getDate: function () {
    var that = this;   
    wx.cloud.callFunction({
      name: 'GetPost',
      data: {        
        data: "fun=4&QueryStr=" + that.data.date +  "&QueryStr1="+app.globalData.openid
      },
      success: res => {
        console.log(res);
        let obj = JSON.parse(res.result)
        that.setData({ list: obj })
      },
      fail: err => {
        wx.showToast({
          icon: 'none',
          title: '调用失败',
        })
      }
    })
  },
  submitForm: function () {    
    var date = this.data.fdate;

    
    this.setData({ Temp: false,remark:false });
    this.getDate();
  },
  onLoad: function () {    
   
  },
  showit:function(){
    this.setData({remark:true });
  }
})